

#include <machine/asm.h>
ENTRY(strlen)
        movl    8(%esp), %ecx
        xorl    %eax, %eax
        dec     %eax
1:
        incl    %eax
        cmpb    $0, 0(%ecx,%eax,1)
        jnz 1b
        ret
END(strlen)
